import Cookies from 'js-cookie';

const TokenKey = 'Admin-Token-Id';

export function getToken(name = null) {
  const str = name || TokenKey;
  return Cookies.get(str);
}

export function setToken(token, name = null) {
  const str = name || TokenKey;
  return Cookies.set(str, token);
}
export function removeToken(name = null) {
  const str = name || TokenKey;
  return Cookies.remove(str);
}
